<template>
  <div>
    <Gantt
      ref="gantt"
      v-if="Array.isArray(this.data[0]) && this.data[0].length !== 0"
    />
    <br />
    <StatusCard
      v-for="(n, i) in data[1]"
      :key="n.companyName + i"
      :t="n.dunpai"
      borderColor="#FF5393"
    >
      <!-- {{ n.moduleName }} -->
      <div slot="title">{{ n.companyName }}</div>
      <div slot="action">
        <img
          style="width: 16px;height: 14.58px;position: relative;top:2px;"
          src="./searchResult.png"
          alt=""
        />
        调查结果：{{ n.result }}
      </div>
      <div class="work-info-a">
        <div class="li" v-for="(item, k) in n.proList" :key="k">
          <div class="title" style="font-weight: bold;">{{ item.proName }}</div>
          <div>
            <!-- <span class="title">候选人提供：</span>{{ item.canName }} -->
            <span class="title">调查员核实：</span>{{ item.sumName }}
          </div>
        </div>
      </div>
    </StatusCard>
    <div v-if="data[0].length === 0" class="empty">未查到相关记录</div>
  </div>
</template>

<script>
import Gantt from "../Gantt.vue";
import StatusCard from "../miniCard/StatusCard2.vue";
export default {
  props: {
    data: {
      type: Array,
      default: () => {
        return [];
      },
    },
  },
  data() {
    return {};
  },
  methods: {},
  mounted: function() {
    this.$refs["gantt"].buildChart(this.data[0]);
  },
  components: { Gantt, StatusCard },
};
</script>
<style lang="scss">
.work-info-a {
  display: flex;
  flex-direction: column;
  font-size: 12px;
  max-height: calc(100vh - 200px);
  color: #787dab;
  overflow-y: auto;
  .li {
    padding: 8px 0;
    border-bottom: 1px solid #1c1e2e;
    .title {
      //font-weight: bold;
      color: #fff;
    }
  }
}
</style>
